<?php 
ob_start();
session_start();
$teamid=$_SESSION['teamID'];
if ($_SESSION['teamID']!=1){header('LOCATION:main.php');}
?>
<!DOCTYPE html>
<html>
<head>
<title>Coach</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="Content/bootstrap.css" rel="stylesheet" />
<link href="Content/bootstrap-datepicker3.css" rel="stylesheet" />
<link href="Content/site.css" rel="stylesheet" />
<script src="Scripts/jquery-1.9.1.js"></script>
<script src="Scripts/bootstrap.js"></script>
<script src="Scripts/bootstrap-datepicker.js"></script>
</head>
<body>
<?php include_once("php/coach_classes.php");?>
<div class="container blue_border">
<?php 
include_once("php/banner.php");
?>
<?php 
include_once("php/nav_bar.php");
?>
<h1>Update Result</h1>

<div class="panel-group" id="accordion">
<?php 
	foreach($allRounds as $r){
?>
  <div class="panel panel-default">
    <div class="panel-heading">
      <div class="row"> <a data-toggle="collapse" data-parent="#accordion" href="#round<?php echo $r->roundID;?>">
        <div class="col-md-2 col-xs-5"><h4 class="panel-title"> <?php echo "Round ".$r->round_number;?> </h4></div>
        <div class="col-md-2 col-xs-7"><h4 class="panel-title"> <?php echo $r->round_date;?></h4></div>
        </a> </div>
      <div id="round<?php echo $r->roundID;?>" class="panel-collapse collapse">
        <div class="panel-body">
        <?php
		  $schedles=$repSchedule->maps($repSchedule->getScheduleByRoundID($r->roundID));
		  foreach($schedles as $s){ 
		  include("php/main_teams_open.php");
		  ?> 
          <div class="container-fluid">
          <div class="row">
         	 <a href="coach_manage_result.php?id=<?php echo $s->round_scheduleID;?>">
             	<div class="col-md-2 col-xs-5"><?php echo $team1->team_name;?></div>
                <div class="col-md-1 col-xs-2">VS</div>
                <div class="col-md-2 col-xs-5"><?php echo $team2->team_name;?></div>
             </a>
          </div>
          </div>
          <?php }?>
        </div>
      </div>
    </div>
  
  </div>
    <?php	} ?>
</div>

</div>
<?php ob_flush();?>
</body>
</html>
